package com.example.commom.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 *  状态码 枚举
 */

public enum StatusCodeEnum {

    OK(200, "操作成功"),
    Redirect(302, "登录信息已过期"),
    UNAUTHORIZED(401, "没有权限"),
    FAILED(-1, "操作失败, 请稍后再试");

    @EnumValue
    private final Integer code;

    private final String msg;

    StatusCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}